package com.huawang.mdesign.model.service.request;

import com.huawang.business.constants.ParamErrorConstants;
import com.huawang.business.dto.ProjectIdDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class UpdateReadOnlyDTO extends ProjectIdDTO {

    @NotBlank(message = ParamErrorConstants.NO_PROJECT_ID)
    private String projectId;

    @Schema(title = "需要变更只读状态的模型,若为空，则变更整个项目的模型只读属性")
    @NotEmpty(message = ParamErrorConstants.NO_IDS)
    private List<String> ids;

    @NotNull(message = ParamErrorConstants.NO_READONLY)
    @Schema(title = "是否只读, true: 只读，false：非只读")
    private Boolean readonly;
}
